package cn.sky.demo.service;

import cn.sky.demo.domain.ResponseResult;
import cn.sky.demo.domain.dto.AddUserDto;
import cn.sky.demo.domain.dto.LoginUserDto;
import cn.sky.demo.domain.dto.RegistryUserDto;
import cn.sky.demo.domain.dto.UpdateUserDto;
import cn.sky.demo.domain.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * @author sky
 * @date 2025年09月15日 16:51
 * @description
 * @since 1.0.0
 */
public interface UserService extends IService<User>{
    ResponseResult addUser(AddUserDto addUserDto);

    ResponseResult updateUser(UpdateUserDto updateUserDto);

    ResponseResult deleteUser(Long id);

    ResponseResult getUser(Integer pageNum, Integer pageSize);

    ResponseResult registryUser(RegistryUserDto registryUserDto);

    ResponseResult login(LoginUserDto loginUserDto);

    User checkToken(String token);

    cn.sky.demo.test.User authenticate(String username, String password);

    void saveRefreshToken(Long id, String refreshToken, int i);

    cn.sky.demo.test.User findUserByRefreshToken(String refreshToken);

    void removeRefreshToken(String refreshToken);
}
